package cn.geodata.tools;

import java.util.logging.Level;
import java.util.logging.Logger;

import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.XMLConfiguration;

public class Configure {
	private static Logger log = Logger.getAnonymousLogger();
	private static XMLConfiguration config;
	
	public static XMLConfiguration getConfig(){
		if(config == null){
			try {
				config = new XMLConfiguration(Class.class.getResource("/conf/configure.xml"));
			} catch (ConfigurationException e) {
				log.log(Level.SEVERE, "Failed to create the configure object", e);
			}
		}
		
		return config;
	}
}
